3.39 \(\int \frac{(d+e x)^2}{x^2 \sqrt{d^2-e^2 x^2}} \, dx\)

Optimal. Leaf size=68 \[ -\frac{\sqrt{d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \]

[Out]

-(Sqrt[d^2 - e^2*x^2]/x) + e*ArcTan[(e*x)/Sqrt[d^2 - e^2*x^2]] - 2*e*ArcTanh[Sqrt[d^2 - e^2*x^2]/d]

________________________________________________________________________________________

Rubi [A]  time = 0.115041, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.259, Rules used = {1807, 844, 217, 203, 266, 63, 208} \[ -\frac{\sqrt{d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2/(x^2*Sqrt[d^2 - e^2*x^2]),x]

[Out]

-(Sqrt[d^2 - e^2*x^2]/x) + e*ArcTan[(e*x)/Sqrt[d^2 - e^2*x^2]] - 2*e*ArcTanh[Sqrt[d^2 - e^2*x^2]/d]

Rule 1807

Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, c*x, x],
 R = PolynomialRemainder[Pq, c*x, x]}, Simp[(R*(c*x)^(m + 1)*(a + b*x^2)^(p + 1))/(a*c*(m + 1)), x] + Dist[1/(
a*c*(m + 1)), Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*(m + 2*p + 3)*x, x], x], x]] /;
FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && LtQ[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2}{x^2 \sqrt{d^2-e^2 x^2}} \, dx &=-\frac{\sqrt{d^2-e^2 x^2}}{x}-\frac{\int \frac{-2 d^3 e-d^2 e^2 x}{x \sqrt{d^2-e^2 x^2}} \, dx}{d^2}\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{x}+(2 d e) \int \frac{1}{x \sqrt{d^2-e^2 x^2}} \, dx+e^2 \int \frac{1}{\sqrt{d^2-e^2 x^2}} \, dx\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{x}+(d e) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{d^2-e^2 x}} \, dx,x,x^2\right )+e^2 \operatorname{Subst}\left (\int \frac{1}{1+e^2 x^2} \, dx,x,\frac{x}{\sqrt{d^2-e^2 x^2}}\right )\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-\frac{(2 d) \operatorname{Subst}\left (\int \frac{1}{\frac{d^2}{e^2}-\frac{x^2}{e^2}} \, dx,x,\sqrt{d^2-e^2 x^2}\right )}{e}\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )\\ \end{align*}

Mathematica [A]  time = 0.0371478, size = 68, normalized size = 1. \[ -\frac{\sqrt{d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac{e x}{\sqrt{d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2/(x^2*Sqrt[d^2 - e^2*x^2]),x]

[Out]

-(Sqrt[d^2 - e^2*x^2]/x) + e*ArcTan[(e*x)/Sqrt[d^2 - e^2*x^2]] - 2*e*ArcTanh[Sqrt[d^2 - e^2*x^2]/d]

________________________________________________________________________________________

Maple [A]  time = 0.055, size = 93, normalized size = 1.4 \begin{align*}{{e}^{2}\arctan \left ({x\sqrt{{e}^{2}}{\frac{1}{\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}}} \right ){\frac{1}{\sqrt{{e}^{2}}}}}-2\,{\frac{de}{\sqrt{{d}^{2}}}\ln \left ({\frac{2\,{d}^{2}+2\,\sqrt{{d}^{2}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}{x}} \right ) }-{\frac{1}{x}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2/x^2/(-e^2*x^2+d^2)^(1/2),x)

[Out]

e^2/(e^2)^(1/2)*arctan((e^2)^(1/2)*x/(-e^2*x^2+d^2)^(1/2))-2*d*e/(d^2)^(1/2)*ln((2*d^2+2*(d^2)^(1/2)*(-e^2*x^2
+d^2)^(1/2))/x)-(-e^2*x^2+d^2)^(1/2)/x

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/x^2/(-e^2*x^2+d^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.86666, size = 162, normalized size = 2.38 \begin{align*} -\frac{2 \, e x \arctan \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{e x}\right ) - 2 \, e x \log \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{x}\right ) + \sqrt{-e^{2} x^{2} + d^{2}}}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/x^2/(-e^2*x^2+d^2)^(1/2),x, algorithm="fricas")

[Out]

-(2*e*x*arctan(-(d - sqrt(-e^2*x^2 + d^2))/(e*x)) - 2*e*x*log(-(d - sqrt(-e^2*x^2 + d^2))/x) + sqrt(-e^2*x^2 +
 d^2))/x

________________________________________________________________________________________

Sympy [C]  time = 3.74134, size = 214, normalized size = 3.15 \begin{align*} d^{2} \left (\begin{cases} - \frac{e \sqrt{\frac{d^{2}}{e^{2} x^{2}} - 1}}{d^{2}} & \text{for}\: \frac{\left |{d^{2}}\right |}{\left |{e^{2}}\right | \left |{x^{2}}\right |} > 1 \\- \frac{i e \sqrt{- \frac{d^{2}}{e^{2} x^{2}} + 1}}{d^{2}} & \text{otherwise} \end{cases}\right ) + 2 d e \left (\begin{cases} - \frac{\operatorname{acosh}{\left (\frac{d}{e x} \right )}}{d} & \text{for}\: \frac{\left |{d^{2}}\right |}{\left |{e^{2}}\right | \left |{x^{2}}\right |} > 1 \\\frac{i \operatorname{asin}{\left (\frac{d}{e x} \right )}}{d} & \text{otherwise} \end{cases}\right ) + e^{2} \left (\begin{cases} \frac{\sqrt{\frac{d^{2}}{e^{2}}} \operatorname{asin}{\left (x \sqrt{\frac{e^{2}}{d^{2}}} \right )}}{\sqrt{d^{2}}} & \text{for}\: d^{2} > 0 \wedge e^{2} > 0 \\\frac{\sqrt{- \frac{d^{2}}{e^{2}}} \operatorname{asinh}{\left (x \sqrt{- \frac{e^{2}}{d^{2}}} \right )}}{\sqrt{d^{2}}} & \text{for}\: d^{2} > 0 \wedge e^{2} < 0 \\\frac{\sqrt{\frac{d^{2}}{e^{2}}} \operatorname{acosh}{\left (x \sqrt{\frac{e^{2}}{d^{2}}} \right )}}{\sqrt{- d^{2}}} & \text{for}\: d^{2} < 0 \wedge e^{2} < 0 \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2/x**2/(-e**2*x**2+d**2)**(1/2),x)

[Out]

d**2*Piecewise((-e*sqrt(d**2/(e**2*x**2) - 1)/d**2, Abs(d**2)/(Abs(e**2)*Abs(x**2)) > 1), (-I*e*sqrt(-d**2/(e*
*2*x**2) + 1)/d**2, True)) + 2*d*e*Piecewise((-acosh(d/(e*x))/d, Abs(d**2)/(Abs(e**2)*Abs(x**2)) > 1), (I*asin
(d/(e*x))/d, True)) + e**2*Piecewise((sqrt(d**2/e**2)*asin(x*sqrt(e**2/d**2))/sqrt(d**2), (d**2 > 0) & (e**2 >
 0)), (sqrt(-d**2/e**2)*asinh(x*sqrt(-e**2/d**2))/sqrt(d**2), (d**2 > 0) & (e**2 < 0)), (sqrt(d**2/e**2)*acosh
(x*sqrt(e**2/d**2))/sqrt(-d**2), (d**2 < 0) & (e**2 < 0)))

________________________________________________________________________________________

Giac [A]  time = 1.18257, size = 144, normalized size = 2.12 \begin{align*} \arcsin \left (\frac{x e}{d}\right ) e \mathrm{sgn}\left (d\right ) - 2 \, e \log \left (\frac{{\left | -2 \, d e - 2 \, \sqrt{-x^{2} e^{2} + d^{2}} e \right |} e^{\left (-2\right )}}{2 \,{\left | x \right |}}\right ) + \frac{x e^{3}}{2 \,{\left (d e + \sqrt{-x^{2} e^{2} + d^{2}} e\right )}} - \frac{{\left (d e + \sqrt{-x^{2} e^{2} + d^{2}} e\right )} e^{\left (-1\right )}}{2 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/x^2/(-e^2*x^2+d^2)^(1/2),x, algorithm="giac")

[Out]

arcsin(x*e/d)*e*sgn(d) - 2*e*log(1/2*abs(-2*d*e - 2*sqrt(-x^2*e^2 + d^2)*e)*e^(-2)/abs(x)) + 1/2*x*e^3/(d*e +
sqrt(-x^2*e^2 + d^2)*e) - 1/2*(d*e + sqrt(-x^2*e^2 + d^2)*e)*e^(-1)/x